package com.ruoyi.xspc.sy.cjfl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.xspc.sy.cjfl.mapper.BFlowerSceneCategoryMapper;
import com.ruoyi.xspc.sy.cjfl.domain.BFlowerSceneCategory;
import com.ruoyi.xspc.sy.cjfl.service.IBFlowerSceneCategoryService;

/**
 * 鲜花场景分类Service业务层处理
 * 
 * @author YY
 * @date 2025-11-08
 */
@Service
public class BFlowerSceneCategoryServiceImpl implements IBFlowerSceneCategoryService 
{
    @Autowired
    private BFlowerSceneCategoryMapper bFlowerSceneCategoryMapper;

    /**
     * 查询鲜花场景分类
     * 
     * @param id 鲜花场景分类主键
     * @return 鲜花场景分类
     */
    @Override
    public BFlowerSceneCategory selectBFlowerSceneCategoryById(Long id)
    {
        return bFlowerSceneCategoryMapper.selectBFlowerSceneCategoryById(id);
    }

    /**
     * 查询鲜花场景分类列表
     * 
     * @param bFlowerSceneCategory 鲜花场景分类
     * @return 鲜花场景分类
     */
    @Override
    public List<BFlowerSceneCategory> selectBFlowerSceneCategoryList(BFlowerSceneCategory bFlowerSceneCategory)
    {
        return bFlowerSceneCategoryMapper.selectBFlowerSceneCategoryList(bFlowerSceneCategory);
    }

    /**
     * 新增鲜花场景分类
     * 
     * @param bFlowerSceneCategory 鲜花场景分类
     * @return 结果
     */
    @Override
    public int insertBFlowerSceneCategory(BFlowerSceneCategory bFlowerSceneCategory)
    {
        bFlowerSceneCategory.setCreateTime(DateUtils.getNowDate());
        return bFlowerSceneCategoryMapper.insertBFlowerSceneCategory(bFlowerSceneCategory);
    }

    /**
     * 修改鲜花场景分类
     * 
     * @param bFlowerSceneCategory 鲜花场景分类
     * @return 结果
     */
    @Override
    public int updateBFlowerSceneCategory(BFlowerSceneCategory bFlowerSceneCategory)
    {
        bFlowerSceneCategory.setUpdateTime(DateUtils.getNowDate());
        return bFlowerSceneCategoryMapper.updateBFlowerSceneCategory(bFlowerSceneCategory);
    }

    /**
     * 批量删除鲜花场景分类
     * 
     * @param ids 需要删除的鲜花场景分类主键
     * @return 结果
     */
    @Override
    public int deleteBFlowerSceneCategoryByIds(Long[] ids)
    {
        return bFlowerSceneCategoryMapper.deleteBFlowerSceneCategoryByIds(ids);
    }

    /**
     * 删除鲜花场景分类信息
     * 
     * @param id 鲜花场景分类主键
     * @return 结果
     */
    @Override
    public int deleteBFlowerSceneCategoryById(Long id)
    {
        return bFlowerSceneCategoryMapper.deleteBFlowerSceneCategoryById(id);
    }
}
